package com.itheima.leyou.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.leyou.po.Category;
import com.leyou.item.dto.CategoryDTO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface CategoryMapper  extends BaseMapper<Category> {
//    @Select("select * from tb_category where parent_id=#{pid}")
//    List<CategoryDTO> queryCategorysByPid(@Param("pid") Long pid);


    @Select("select * from tb_category where id=#{id}")
    CategoryDTO queryCategoryById(@Param("id") Long id);



//    List<CategoryDTO> queryCategoryByIds(@Param("ids") List<Long> ids);

//    @Select("select  brand_id from tb_category_brand where brand_id =#{bid}")
//    List<Long> queryCategoryByBrandAndCateegoryByBrandId(@Param("bid") Long bid);

//    @Select("select * from tb_category where category_id=#{id}")
//    List<CategoryDTO> queryByCategoryId(@Param("category_id") Long category_id);
}
